package com.chinasoft.feignclient.client;

import com.chinasoft.feignclient.config.FeignConfiguration;
import com.chinasoft.ms.pojo.MyToken;
import com.chinasoft.ms.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "user-service", configuration = FeignConfiguration.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    public User getUserWithId(@PathVariable("id") Long id);

    @GetMapping("/role/{id}")
    public int getUserroleWithId(@PathVariable Long id);
}
